Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use eval instead of JSON.parse #68

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

arthurdarcet
Copy link

This handles:

  • trailing commas on the last line of array/objects
  • no need to use quotes around object keys
  • makes it possible to use "new Date()" in a query to have it return the current time

arthurdarcet and others added 3 commits September 10, 2019 17:13
This handles:
 - trailing commas on the last line of array/objects
 - no need to use quotes around object keys
 - makes it possible to use "new Date()" in a query to have it return the current time
@spatecon
Copy link

spatecon commented Mar 13, 2023

Using eval on server side for this type of logic is overkill.
It can lead to exploits, allowing not only the use of new Date(), but also file I/O and SSRF.

Here's an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants